-- GENERATED SPELL FOR [The Ebon Watcher] --


function spell0_30596(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(49895,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30596', 641, 1)
end

function spell1_30596(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(49909,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30596', 536, 1)
end

function spell2_30596(pUnit, Event) --@Obliterate,n/a--
pUnit:FullCastSpellOnTarget(51425,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30596', 630, 1)
end

function Sorts_30596(pUnit, Event)
local choix_sorts_30596 = math.random(0, 2)
if choix_sorts_30596 == 0 then
pUnit:RegisterEvent('spell0_30596', 1, 1)
end
if choix_sorts_30596 == 1 then
pUnit:RegisterEvent('spell1_30596', 1, 1)
end
if choix_sorts_30596 == 2 then
pUnit:RegisterEvent('spell2_30596', 1, 1)
end
end

function mob30596_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30596', math.random(1500, 3000), 1)
end

function mob30596_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30596_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30596_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30596, 1, 'mob30596_Action')
RegisterUnitEvent(30596, 2, 'mob30596_Leave')
RegisterUnitEvent(30596, 3, 'mob30596_Kill')
RegisterUnitEvent(30596, 4, 'mob30596_Die')
